package com.x.websocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * <p>
 * .
 *
 * @author o_o
 * @date 2024-06-09
 */
@Configuration
public class WebSocketConfig {

    /**
     * 该bean用于扫描被 @ServerEndpoint 注解的类，并将其作为服务端
     *
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
